{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "066604b7",
   "metadata": {},
   "source": [
    "### 随机数生成六个班的考试成绩，3门考试：Python、数学、语文。每个班50人"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "8eac736d",
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 72,
   "id": "376455aa",
   "metadata": {
    "code_folding": [],
    "collapsed": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[ 21,  89,  34,  16,   5,  99,   4,  47,  52,  26,  42,  52,  22,\n",
       "         86,  12,   8,   4,  49, 100,  99,  91,  72,  37,  53,  97,  28,\n",
       "         84,  40,  76,  14,  59,  57,  15,  92,  49,  55,  81,  60,  89,\n",
       "         47,  34,  76,  63,  95,  24,  44,   1,  78,  18,  69],\n",
       "       [ 31,  13,  42,   6,   9,  78,  67,  64,  30,  67,  75,  73,  84,\n",
       "         25,  86,  78,  51,  82,  96,  30,  96,  62,  72,   2,  73,  17,\n",
       "         17,  62,  64,   8,   3,   8,  72,   9,  81,  91,  93,  81,  40,\n",
       "         50,  34,  96,  14,  38,  24,  94,  91,   3,  16,  17],\n",
       "       [ 31,  40,  80,  26,  52,  41,  71,  50,  67,   2,  21,   8,  28,\n",
       "         35,   3,  80,  89,  65,  47,  89,   8,  62,  77,  69,  39,  14,\n",
       "         37,  17,  83,  83,  85,  95,  17,  83,  77,   6,  17,  43,  42,\n",
       "         14,  41,   5,  20,  98,   9,   9,  36,  82,  27,  57]])"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "arr1=np.random.randint(0,101,(3,50))\n",
    "display(arr1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 73,
   "id": "af7f452a",
   "metadata": {
    "collapsed": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[ 13,  42,  57,  16,  94, 100,  70,  31,  22,  30,  11,  12,  26,\n",
       "          3,  16,  57,   5,  65,  19,  24,  67,  92,  53,  80,  62,  91,\n",
       "         46,  16,  81,  57,  75,  43,  13,  66,  37,  89,  78,  22,  22,\n",
       "         90,   5,  55,   6,  82,  70,   2,  67,  47,  20,  43],\n",
       "       [ 63,  97,  75,  53,  19,  67,  39,  53,  60,  27,  87, 100,   5,\n",
       "         88,  60,  22,  97,   6,  45,  99,  77,   5,  89,  34,  30,  26,\n",
       "         71,  56,  18,  43,   9,  53,  57,  40,  67,  18,   1,  23,  71,\n",
       "         11,  77,  77,  96,  43,   4,   7,  75,  93,  95, 100],\n",
       "       [ 66,  77,  85,  55, 100,  39,  77,  83,  73,  87,  77,  25,  19,\n",
       "         23,  83,  89,  64,  16,  84,  12,  89,  94,   7,  51,  95,  45,\n",
       "         57,   6,  14,  33,  52,  90,  34,  18,  85,  70,  34,  74,  47,\n",
       "         70,  67,  14,  94,   8,  24,  22,  86,  28,  77,  97]])"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "arr2=np.random.randint(0,101,(3,50))\n",
    "display(arr2)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 74,
   "id": "d5567532",
   "metadata": {
    "collapsed": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[ 21,  59,  70,   4,  58,  69,  25,  20,   3,  17,  94,  14,  60,\n",
       "         79,  83,  87,  84,  13, 100,  51,  23,   1,  75,  45,  11,  69,\n",
       "         36,  66,  12,  24,  16,  86,  77,  48,  54,  84,  95,  62,  64,\n",
       "         95,  64,  23,  12,  51,   0,  94,  57,  86,  11,  68],\n",
       "       [  7,  78,  55,  33,  72,   1,  45,  88,  41,  99,  32,  94,  10,\n",
       "         90,  51,  39,  33, 100,  83,  59,  58,  96,  29,  45,  32,  23,\n",
       "         36,  23,  26,  50,  38,   5,  67,  57,  35,   7,   3,  86,  24,\n",
       "         59, 100,  72,   0,  40,  97,  28,  65,  14,  73,   4],\n",
       "       [ 14,  27,   9,  46,  27,  16,  41,  72,  83,  63,   0,  28,  72,\n",
       "         17,  63,  69,  81,  15,  91,  11,  68,  39,  15,  78,  38,  38,\n",
       "         39,  58,  76,  99,   5,  53,  75,  20,  76,  34,  74,  65,  65,\n",
       "         51,  37,  18,  46,  47,  53,  82,  37,  74,   7,  69]])"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "arr3=np.random.randint(0,101,(3,50))\n",
    "display(arr3)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 75,
   "id": "d78f2586",
   "metadata": {
    "collapsed": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[  3,  78,  28,  86,  57,  84,  32,  96,  35,  11,  91,  53,   8,\n",
       "         21,  67,  93,  25,  85,  42,  60,  12,  48,  93,  68,   9,  14,\n",
       "         67, 100,  40,  14,  28,  53,   6,  78,  79,  86,  33,  37,  68,\n",
       "         56,  77,  78,  41,  38,  67,  49,  61,  10,   5,  35],\n",
       "       [  5,  61,  49,  80,  95,  49,  87,  22,  54,  47,  96,  13,  17,\n",
       "         88,  52,  37,  19,  18,  22,  71,  70,  29,   8,  10,  39,   6,\n",
       "         20,  87,  85,  44,  94,  39,  69,  13,   3,  28,  29,  13,  67,\n",
       "         93,  22,  30,  39,  53,   7,  65,  81,  49,  24,  53],\n",
       "       [ 50,  16,  83,  42,   2,  10,  97,  85,  96,  64,  70,  35,  45,\n",
       "         21,  68,  75, 100,   5,  70,  56,  46,   1,  75,  71,  23,  72,\n",
       "         75,  14,  17,  22,  33,  31,   8,  45,  84,  88,  59,   8,  34,\n",
       "         43,  46,  69,  71,  79,   5,  40,  82,  31,  92,  40]])"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "arr4=np.random.randint(0,101,(3,50))\n",
    "display(arr4)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 76,
   "id": "b4619b42",
   "metadata": {
    "collapsed": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[ 67,  97,  75,  76,  44,  97,   2,  71,  83,  69,  68,  42,  94,\n",
       "         12,  79,  85,   6, 100,   6,  85,  63,  43,   1,  10,  93,  19,\n",
       "          3,  46,  89,  74,  73,   6,  88,  76,  60,  22,  71,  62,  59,\n",
       "         58,  90,  90,  91,  32,  97,  99,  65,  22,  58,  70],\n",
       "       [ 23,  88,  70,  89,  58,  70,  82,  10,  79,  58,  29,  98,  36,\n",
       "         66,  65,  32,  18,   8,  52,   9,  21,  96,  11,  75,  39,  56,\n",
       "          3,  84,   5,  88,  82,  97,   3,   0,  65,  82,   4,  49,  60,\n",
       "         58,  36,  49,  96,  63,  64,  51,  50,  34,  34,  87],\n",
       "       [ 29,  78,  98,  90,  41,  41,  86,  65,  46,  48,  36,  19,  65,\n",
       "         45,  99,  14,  80,  22,  98,   4,  82,  34,   1,  54,  77,  75,\n",
       "         93,  89,  68,   1,  22,  78,   0, 100,   6,  46,  35,  54,  37,\n",
       "         17,  76,  76,  36,  64,  52,  42,  83, 100,  19,  37]])"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "arr5=np.random.randint(0,101,(3,50))\n",
    "display(arr5)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 77,
   "id": "f478bb27",
   "metadata": {
    "collapsed": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[ 86,  37,  97,  14,  21,   1,  23,  13,  43,  21,  31,   4,   1,\n",
       "          2,  74,  41,  20,   2,  85,  58,  47,   0,  78,  33,  44,  25,\n",
       "         57,  32,  82,  91,  94,   3,  36,  58,  79,   5,  86,  32,  51,\n",
       "         56,  74,  62,  52,  60,  82,  57,  87,  91,  58,  71],\n",
       "       [ 30,  82,  44,   0,  30,   4,  47,  50,  56,  28,  91,   4,  33,\n",
       "          8,  73,  49,  73,  48,  41,  15,  26,  91,   8,  15,   5,  47,\n",
       "         12,  39,  31,  63,  14,   0,  40,  65,  47,  88, 100,  32,  66,\n",
       "         28,  77,  78,  99,  67,  54,  64,  78,  72,  77,  13],\n",
       "       [ 44,  66,  62,  65,  62,  47,  51,  90,  70,  29,  76,  26,  98,\n",
       "         90,  35,  99,   5,  56,  57,  93,  66,  98,  76,   6,  75,  29,\n",
       "         99,  72,   0,  64, 100,  35,  75,  27,  51,  57,  50,  97,  17,\n",
       "         81,  43,  70,  79,  13,  52,  58,  13,  87,   6,  52]])"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "arr6=np.random.randint(0,101,(3,50))\n",
    "display(arr6)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "ced5c898",
   "metadata": {},
   "source": [
    "### 将六个班的考试成绩进行合并得到score"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 104,
   "id": "e55ea8d3",
   "metadata": {
    "collapsed": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[ 21,  89,  34,  16,   5,  99,   4,  47,  52,  26,  42,  52,  22,\n",
       "         86,  12,   8,   4,  49, 100,  99,  91,  72,  37,  53,  97,  28,\n",
       "         84,  40,  76,  14,  59,  57,  15,  92,  49,  55,  81,  60,  89,\n",
       "         47,  34,  76,  63,  95,  24,  44,   1,  78,  18,  69,  13,  42,\n",
       "         57,  16,  94, 100,  70,  31,  22,  30,  11,  12,  26,   3,  16,\n",
       "         57,   5,  65,  19,  24,  67,  92,  53,  80,  62,  91,  46,  16,\n",
       "         81,  57,  75,  43,  13,  66,  37,  89,  78,  22,  22,  90,   5,\n",
       "         55,   6,  82,  70,   2,  67,  47,  20,  43,  21,  59,  70,   4,\n",
       "         58,  69,  25,  20,   3,  17,  94,  14,  60,  79,  83,  87,  84,\n",
       "         13, 100,  51,  23,   1,  75,  45,  11,  69,  36,  66,  12,  24,\n",
       "         16,  86,  77,  48,  54,  84,  95,  62,  64,  95,  64,  23,  12,\n",
       "         51,   0,  94,  57,  86,  11,  68,   3,  78,  28,  86,  57,  84,\n",
       "         32,  96,  35,  11,  91,  53,   8,  21,  67,  93,  25,  85,  42,\n",
       "         60,  12,  48,  93,  68,   9,  14,  67, 100,  40,  14,  28,  53,\n",
       "          6,  78,  79,  86,  33,  37,  68,  56,  77,  78,  41,  38,  67,\n",
       "         49,  61,  10,   5,  35,  67,  97,  75,  76,  44,  97,   2,  71,\n",
       "         83,  69,  68,  42,  94,  12,  79,  85,   6, 100,   6,  85,  63,\n",
       "         43,   1,  10,  93,  19,   3,  46,  89,  74,  73,   6,  88,  76,\n",
       "         60,  22,  71,  62,  59,  58,  90,  90,  91,  32,  97,  99,  65,\n",
       "         22,  58,  70,  86,  37,  97,  14,  21,   1,  23,  13,  43,  21,\n",
       "         31,   4,   1,   2,  74,  41,  20,   2,  85,  58,  47,   0,  78,\n",
       "         33,  44,  25,  57,  32,  82,  91,  94,   3,  36,  58,  79,   5,\n",
       "         86,  32,  51,  56,  74,  62,  52,  60,  82,  57,  87,  91,  58,\n",
       "         71],\n",
       "       [ 31,  13,  42,   6,   9,  78,  67,  64,  30,  67,  75,  73,  84,\n",
       "         25,  86,  78,  51,  82,  96,  30,  96,  62,  72,   2,  73,  17,\n",
       "         17,  62,  64,   8,   3,   8,  72,   9,  81,  91,  93,  81,  40,\n",
       "         50,  34,  96,  14,  38,  24,  94,  91,   3,  16,  17,  63,  97,\n",
       "         75,  53,  19,  67,  39,  53,  60,  27,  87, 100,   5,  88,  60,\n",
       "         22,  97,   6,  45,  99,  77,   5,  89,  34,  30,  26,  71,  56,\n",
       "         18,  43,   9,  53,  57,  40,  67,  18,   1,  23,  71,  11,  77,\n",
       "         77,  96,  43,   4,   7,  75,  93,  95, 100,   7,  78,  55,  33,\n",
       "         72,   1,  45,  88,  41,  99,  32,  94,  10,  90,  51,  39,  33,\n",
       "        100,  83,  59,  58,  96,  29,  45,  32,  23,  36,  23,  26,  50,\n",
       "         38,   5,  67,  57,  35,   7,   3,  86,  24,  59, 100,  72,   0,\n",
       "         40,  97,  28,  65,  14,  73,   4,   5,  61,  49,  80,  95,  49,\n",
       "         87,  22,  54,  47,  96,  13,  17,  88,  52,  37,  19,  18,  22,\n",
       "         71,  70,  29,   8,  10,  39,   6,  20,  87,  85,  44,  94,  39,\n",
       "         69,  13,   3,  28,  29,  13,  67,  93,  22,  30,  39,  53,   7,\n",
       "         65,  81,  49,  24,  53,  23,  88,  70,  89,  58,  70,  82,  10,\n",
       "         79,  58,  29,  98,  36,  66,  65,  32,  18,   8,  52,   9,  21,\n",
       "         96,  11,  75,  39,  56,   3,  84,   5,  88,  82,  97,   3,   0,\n",
       "         65,  82,   4,  49,  60,  58,  36,  49,  96,  63,  64,  51,  50,\n",
       "         34,  34,  87,  30,  82,  44,   0,  30,   4,  47,  50,  56,  28,\n",
       "         91,   4,  33,   8,  73,  49,  73,  48,  41,  15,  26,  91,   8,\n",
       "         15,   5,  47,  12,  39,  31,  63,  14,   0,  40,  65,  47,  88,\n",
       "        100,  32,  66,  28,  77,  78,  99,  67,  54,  64,  78,  72,  77,\n",
       "         13],\n",
       "       [ 31,  40,  80,  26,  52,  41,  71,  50,  67,   2,  21,   8,  28,\n",
       "         35,   3,  80,  89,  65,  47,  89,   8,  62,  77,  69,  39,  14,\n",
       "         37,  17,  83,  83,  85,  95,  17,  83,  77,   6,  17,  43,  42,\n",
       "         14,  41,   5,  20,  98,   9,   9,  36,  82,  27,  57,  66,  77,\n",
       "         85,  55, 100,  39,  77,  83,  73,  87,  77,  25,  19,  23,  83,\n",
       "         89,  64,  16,  84,  12,  89,  94,   7,  51,  95,  45,  57,   6,\n",
       "         14,  33,  52,  90,  34,  18,  85,  70,  34,  74,  47,  70,  67,\n",
       "         14,  94,   8,  24,  22,  86,  28,  77,  97,  14,  27,   9,  46,\n",
       "         27,  16,  41,  72,  83,  63,   0,  28,  72,  17,  63,  69,  81,\n",
       "         15,  91,  11,  68,  39,  15,  78,  38,  38,  39,  58,  76,  99,\n",
       "          5,  53,  75,  20,  76,  34,  74,  65,  65,  51,  37,  18,  46,\n",
       "         47,  53,  82,  37,  74,   7,  69,  50,  16,  83,  42,   2,  10,\n",
       "         97,  85,  96,  64,  70,  35,  45,  21,  68,  75, 100,   5,  70,\n",
       "         56,  46,   1,  75,  71,  23,  72,  75,  14,  17,  22,  33,  31,\n",
       "          8,  45,  84,  88,  59,   8,  34,  43,  46,  69,  71,  79,   5,\n",
       "         40,  82,  31,  92,  40,  29,  78,  98,  90,  41,  41,  86,  65,\n",
       "         46,  48,  36,  19,  65,  45,  99,  14,  80,  22,  98,   4,  82,\n",
       "         34,   1,  54,  77,  75,  93,  89,  68,   1,  22,  78,   0, 100,\n",
       "          6,  46,  35,  54,  37,  17,  76,  76,  36,  64,  52,  42,  83,\n",
       "        100,  19,  37,  44,  66,  62,  65,  62,  47,  51,  90,  70,  29,\n",
       "         76,  26,  98,  90,  35,  99,   5,  56,  57,  93,  66,  98,  76,\n",
       "          6,  75,  29,  99,  72,   0,  64, 100,  35,  75,  27,  51,  57,\n",
       "         50,  97,  17,  81,  43,  70,  79,  13,  52,  58,  13,  87,   6,\n",
       "         52]])"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "score=np.concatenate([arr1,arr2,arr3,arr4,arr5,arr6],axis = 1)\n",
    "display(score)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "32bc67de",
   "metadata": {},
   "source": [
    "### 生成性别数组sex，水平叠加数组sex和score得到data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 80,
   "id": "ee5ebb30",
   "metadata": {
    "collapsed": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0,\n",
       "       0, 1, 1, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0,\n",
       "       0, 0, 1, 1, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 1, 1,\n",
       "       1, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0,\n",
       "       1, 1, 0, 1, 0, 0, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1,\n",
       "       1, 1, 1, 0, 1, 1, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1,\n",
       "       1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 1, 0, 1,\n",
       "       1, 0, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 1,\n",
       "       0, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 0,\n",
       "       0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0,\n",
       "       0, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0,\n",
       "       0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 0, 0, 1, 1, 1, 0,\n",
       "       1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 1,\n",
       "       0, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 1, 0, 1])"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "sex=np.random.randint(0,2,300)\n",
    "display(sex)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 101,
   "id": "a89523bb",
   "metadata": {
    "collapsed": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[21, 89, 34, ...,  1,  0,  1],\n",
       "       [31, 13, 42, ...,  1,  0,  1],\n",
       "       [31, 40, 80, ...,  1,  0,  1]])"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "sex2 = np.concatenate([sex,sex,sex],axis = 0)\n",
    "sex3 = sex2.reshape(3,300)\n",
    "data = np.concatenate([score,sex3],axis = 1)\n",
    "display(data)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "4f8681b3",
   "metadata": {},
   "source": [
    "### 分别计算男女生各科成绩统计指标：最小值、最大值、平均分、中位数、标准差"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 130,
   "id": "12745e96",
   "metadata": {},
   "outputs": [],
   "source": [
    "score_python = score[0]\n",
    "score_math = score[1]\n",
    "score_chinese = score[2]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 131,
   "id": "416db7de",
   "metadata": {},
   "outputs": [],
   "source": [
    "cond1 = sex == 0 #女\n",
    "cond2 = sex == 1 # 男\n",
    "F_python = score_python[cond1]\n",
    "M_python = score_python[cond2]\n",
    "F_math = score_math[cond1]\n",
    "M_math = score_math[cond2]\n",
    "F_chinese = score_chinese[cond1]\n",
    "M_chinese = score_chinese[cond2]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 135,
   "id": "3f4147dc",
   "metadata": {
    "collapsed": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'女生-Python：最小值，最大值，平均分，中位数，标准差'"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "最⼩值： 1\n",
      "最⼤值： 100\n",
      "均值： 50.70629370629371\n",
      "中位数： 52.0\n",
      "标准差： 29.721512109372608\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "'女生-math：最小值，最大值，平均分，中位数，标准差'"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "最⼩值： 0\n",
      "最⼤值： 100\n",
      "均值： 48.86713286713287\n",
      "中位数： 49.0\n",
      "标准差： 29.49866365640679\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "'女生-Chinese：最小值，最大值，平均分，中位数，标准差'"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "最⼩值： 0\n",
      "最⼤值： 100\n",
      "均值： 50.0\n",
      "中位数： 51.0\n",
      "标准差： 29.465399882061504\n"
     ]
    }
   ],
   "source": [
    "display('女生-Python：最小值，最大值，平均分，中位数，标准差')\n",
    "print('最⼩值：', np.min(F_python)) \n",
    "print('最⼤值：', np.max(F_python)) \n",
    "print('均值：', np.mean(F_python))\n",
    "print('中位数：', np.median(F_python))\n",
    "print('标准差：', np.std(F_python)) \n",
    "display('女生-math：最小值，最大值，平均分，中位数，标准差')\n",
    "print('最⼩值：', np.min(F_math)) \n",
    "print('最⼤值：', np.max(F_math)) \n",
    "print('均值：', np.mean(F_math))\n",
    "print('中位数：', np.median(F_math))\n",
    "print('标准差：', np.std(F_math))\n",
    "display('女生-Chinese：最小值，最大值，平均分，中位数，标准差')\n",
    "print('最⼩值：', np.min(F_chinese)) \n",
    "print('最⼤值：', np.max(F_chinese)) \n",
    "print('均值：', np.mean(F_chinese))\n",
    "print('中位数：', np.median(F_chinese))\n",
    "print('标准差：', np.std(F_chinese))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 136,
   "id": "7214af01",
   "metadata": {
    "collapsed": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'男生-Python：最小值，最大值，平均分，中位数，标准差'"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "最⼩值： 0\n",
      "最⼤值： 100\n",
      "均值： 50.789808917197455\n",
      "中位数： 56.0\n",
      "标准差： 30.8633792122089\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "'男生-math：最小值，最大值，平均分，中位数，标准差'"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "最⼩值： 0\n",
      "最⼤值： 100\n",
      "均值： 48.99363057324841\n",
      "中位数： 49.0\n",
      "标准差： 30.767775518971415\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "'男生-Chinese：最小值，最大值，平均分，中位数，标准差'"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "最⼩值： 0\n",
      "最⼤值： 100\n",
      "均值： 53.152866242038215\n",
      "中位数： 52.0\n",
      "标准差： 28.63345457823802\n"
     ]
    }
   ],
   "source": [
    "display('男生-Python：最小值，最大值，平均分，中位数，标准差')\n",
    "print('最⼩值：', np.min(M_python)) \n",
    "print('最⼤值：', np.max(M_python)) \n",
    "print('均值：', np.mean(M_python))\n",
    "print('中位数：', np.median(M_python))\n",
    "print('标准差：', np.std(M_python)) \n",
    "display('男生-math：最小值，最大值，平均分，中位数，标准差')\n",
    "print('最⼩值：', np.min(M_math)) \n",
    "print('最⼤值：', np.max(M_math)) \n",
    "print('均值：', np.mean(M_math))\n",
    "print('中位数：', np.median(M_math))\n",
    "print('标准差：', np.std(M_math))\n",
    "display('男生-Chinese：最小值，最大值，平均分，中位数，标准差')\n",
    "print('最⼩值：', np.min(M_chinese)) \n",
    "print('最⼤值：', np.max(M_chinese)) \n",
    "print('均值：', np.mean(M_chinese))\n",
    "print('中位数：', np.median(M_chinese))\n",
    "print('标准差：', np.std(M_chinese))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "939d351c",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.5"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": false
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
